<h1><span></span><?= $message->subject; ?></h1>

<ul class="breadcrumb">
    <li><a href="<?= base_url() ?>"><?= lang('label_home') ?></a></li>
    <li><a href="<?= base_url('user/profile') ?>"><?= lang('label_profile') ?></a></li>
    <li><a href="javascript:void(0)"><?= lang('label_menu_link_private_messages'); ?></a></li>
    <li><a href="<?= base_url("private_messages/$ptype") ?>"><?= lang("label_$ptype"); ?></a></li>
    <li><?= $message->subject; ?></li>
</ul>


<div class="page">

    <?php $this->load->view('template/default/private/top') ?>

    <div style="overflow:hidden;">

        <?php $this->load->view('template/default/private/side') ?>

        <div class="profile_page">
            <h2 class="profile_page_title"><?= lang('label_menu_link_private_messages'); ?> &raquo; <?= lang("label_$ptype") ?> &raquo; <strong><?php echo $message->subject; ?></strong></h2>

            <div class="profile_messages">
                <strong><?php echo $message->subject; ?></strong>
                <br /><span style="color: #B4B4B4"><?php echo lang('label_send_from') . ' ' . timespan($message->create_date) ?></span>
                <?php if ($ptype == 'inbox') { ?>
                    <br /><span><?php echo lang('label_sender') . ': ' . get_username_with_id($message->sender_id) ?></span>
                <?php } elseif ($ptype == 'outbox') { ?>
                    <br /><span><?php echo lang('label_reciver') . ': ' . get_username_with_id($message->receiver_id) ?></span>
                <?php } ?>
                <p>
                    <?php echo $message->message; ?>
                </p>
                <?php if ($message->seen == 'YES') { ?>
                    <br /><span style="color: #B4B4B4"><?php echo lang('label_seen_from') . ' ' . timespan($message->seen_date) ?></span>
                <?php } ?>

                <?php if ($ptype == 'inbox') { ?>
                    <div class="profile_messages_reply" >
                        <a class="replya" style="top: 0" href="<?= base_url("private_messages/send/$message->sender_id") ?>" id="privaye_message_add_reply"><?= lang('label_send') ?></a>
                    </div>
                <?php } ?>
            </div>
        </div>
    </div>
</div>